import axios from 'axios'
// import { baseURL } from '../config'

export const baseURL = 'http://localhost:1337'
export const http = axios.create({
  baseURL,
})

http.interceptors.request.use(function (config) {
  config.headers = {
    token: localStorage.getItem('token'),
  }
  return config
})

http.interceptors.response.use(function (response) {
  return response
})
